﻿<UserControl x:Class="Starehe.Views.School"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="722" d:DesignWidth="1024"
	 Background="White">
    <UserControl.Resources>
        <SolidColorBrush x:Key="TitleBackgroundBrush" Color="{DynamicResource Title4BackgroundColor}"/>
    </UserControl.Resources>
    <Grid Name="mainGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Back button and page title -->
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Border Grid.ColumnSpan="2" Background="{DynamicResource TitleBackgroundBrush}"/>
            <Button x:Name="backButton" Margin="39,40,21,0" 
                        Style="{StaticResource BackButtonX}"
                        VerticalAlignment="Top"
                        AutomationProperties.Name="Back"
                        AutomationProperties.AutomationId="BackButton"
                        AutomationProperties.ItemType="Navigation Button"/>
            <TextBlock x:Name="pageTitle" Text="School" Style="{StaticResource HeaderTextStyle}" Grid.Column="1" HorizontalAlignment="Left"
                        IsHitTestVisible="false" TextWrapping="NoWrap" VerticalAlignment="Bottom" Margin="0,0,30,40"/>

        </Grid>

        <!--body-->
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="205"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <ListBox Name="menu" Grid.Column="0" Height="400" Margin="10,10,0,0" Grid.Row="1" VerticalAlignment="Top"
                 DisplayMemberPath="Title" ItemsSource="{Binding MenuItems}" SelectedIndex="0"
                     BorderThickness="0,0,1,0" BorderBrush="{DynamicResource TitleBackgroundBrush}"/>
            <ContentControl Grid.Column="1" Content="{Binding ElementName=menu, Path=SelectedItem}"/>
        </Grid>
    </Grid>
</UserControl>
